/* 点卷商店 */

var status = 0;

function start() {
    status = -1;
    action(1, 0, 0);
}

function action(mode, type, selection) {
    if (status == 0 && mode == 0) {
        cm.dispose();
        return;
    }
    if (mode == 1) {
        status++;
    } else {
        status--;
    }
    if (status == 0) {
        var selStr = "              #v1142321##e#r军衔勋章系统#v1142321##l\r\n#v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488##v4000488#              #L0##d军衔介绍(推荐)#l#k\r\n             #r#L4#我要升级我的军衔#l\r\n            #b#L5#领取军衔等级福利(火)#l\r\n               #r#L6#基础军衔领取#l\r\n \r\n\r\n #v1142318##v1142318##v1142319##v1142319##v1142320##v1142320##v1142320##v1142321##v1142321#";

        cm.sendSimple(selStr);
    } else if (status == 1) {
        switch (selection) {
        case 0:
            cm.dispose();
            cm.openNpc(1500032,"junxianjs"); //双倍道具
            break;
        case 4:
            cm.dispose();
            cm.openNpc(1500032,"shengjijx"); //暴君
            break;
        case 5:
            cm.dispose();
            cm.openNpc(1500032,"junxianfl"); //各种椅子
            break;
        case 6:
			//var ii = cm.getItemInfo();
//var ii = Packages.server.MapleItemInformationProvider.getInstance();			
			var equip = cm. getNewEquip(1142312); // 生成一个Equip类      
			//toequip.setEnhance(10)              
			equip.setStr(5); //装备力量
			equip.setDex(5); //装备敏捷
			equip.setInt(5); //装备智力
			equip.setLuk(5); //装备运气
			equip.setMatk(1); //物理攻击
			equip.setWatk(1); //魔法攻击 
			//toequip.setOwner("指北针管理员");
			cm.addFromDrop(equip);
			cm.sendOk("恭喜您获得 #r十字旅团高等兵勋章,丢失可以点我补领#k 。");
        		    cm.dispose();
     			       break;
        case 0:
        case 7:
            cm.dispose();
            cm.openNpc(9310071, 2); //洗点卷轴
            break;
        case 8:
            cm.dispose();
            cm.openNpc(9900002, 24); //玩具商店
            break;
        case 9:
            cm.dispose();
            cm.openNpc(9110103); //骑宠商店
            break;
	case 10:
            cm.dispose();
            cm.openNpc(9110114); //破攻石头
            break;
	case 11:
            cm.dispose();
            cm.openNpc(9900002, 5); //一键潜能
            break;
	case 12:
            cm.dispose();
            cm.openNpc(9900002, 1301); //一键潜能
            break;
	case 13:
            cm.dispose();
            cm.openNpc(9270096, 13); //一键潜能
            break;
	case 14:
            cm.dispose();
            cm.openNpc(9900002, 1301); //一键潜能
            break;
	case 15:
            cm.dispose();
            cm.openNpc(9270096, 15); //一键潜能
            break;
        }
    }
}